<?php
class VoteTopPortlet extends RightSidePortlet{
	
	public $title="Top Votes";
	
	public $model;
	
	public function init()
	{
		parent::init();
		//$cs=Yii::app()->clientScript;
	}
	
	
	protected function renderContent()
	{
		//CafeVote::model()->voteToday()->fromSMS()->getVote()
		$tabs=array(
    'tab1'=>array(
          'title'=>'Today',
          'view'=>'application.widgets.views.voteTop',
          'data'=>array('votes'=>CafeVote::model()->voteToday()->getVote()),
    ),
    'tab2'=>array(
          'title'=>'This Week',
          'view'=>'application.widgets.views.voteTop',
          'data'=>array('votes'=>CafeVote::model()->voteThisWeek()->getVote()),
    ),
    'tab3'=>array(
          'title'=>'All',
          'view'=>'application.widgets.views.voteTop',
          'data'=>array('votes'=>CafeVote::model()->getVote()),
    ),
);
$this->widget('CTabView', array('tabs'=>$tabs, 'viewData'=>array(),'activeTab'=>'tab3'));


	}
}